package utils

import (
	"encoding/xml"
)

const API_ROUTES = "/routes/api"
const MONGO_DATABASE = "isv_xqhdserfhi"

var Setting SETTING_XML

type SETTING_XML struct {
	XMLName  xml.Name `xml:"setting"`
	Version  string   `xml:"version,attr"`
	Smtp     SMTP_XML `xml:"smtp"`
	Feedback string   `xml:"feedback"`
}

type WEBSOCKET_DATA struct {
	Action string `json:"action"`

	Data interface{} `json:"data"`
}
type WEBSOCKET_ERR struct {
	Action string      `json:"action"`
	Error  interface{} `json:"error"`
}
type ERROR_XML struct {
	XMLName xml.Name `xml:"error" json:"-"`

	Status      int    `xml:"status" json:"status"`
	Description string `xml:"description" json:"description"`
}
type EMBED_DISPLAYID struct {
	Id      string `xml:"id" json:"id" bson:"id,omitempty"`
	Display string `xml:"display" json:"display" bson:"display,omitempty"`
}

type ATTACHMENT struct {
	Mime   string
	Name   string
	Id     string
	Inline bool
	Data   string
}
type SMTP_XML struct {
	Account  string `xml:"account"`
	Password string `xml:"password"`
	Server   string `xml:"server"`
	Port     int    `xml:"port"`
}
